﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

namespace Commons
{
    class PropertyHelper
    {
        public PropertyHelper()
        {

        }
        [STAThread]
        static void Main(string[] args)
        {


        //    Object dbc = Attribute.GetCustomAttribute(typeof(Student), typeof(DbTable));

        //    if (dbc != null)
        //    {
        //        Console.WriteLine("Find talbe! name =" + ((DbTable)dbc).Name);
        //    }
            //Teacher teacher = new Teacher();
            //foreach (FieldInfo info in typeof(Teacher).GetFields(BindingFlags.Public |
            //                BindingFlags.Static |
            //                BindingFlags.NonPublic |
            //                BindingFlags.Instance |
            //                BindingFlags.DeclaredOnly))
            //{
            //    DbColumn col = (DbColumn)Attribute.GetCustomAttribute(info, typeof(DbColumn));
            //    if (col != null)
            //    {
            //        Console.WriteLine("Find Column! ColumnID =" + col.ColumnID);
            //        info.SetValue(teacher, 0);
                    
            //    }
            //}

          
            Console.ReadLine();

        }

    }
}
